package san.java.inherit_07;

/**
 * 班长
 */

public class Monitor extends Student {

    public void say() {
        // 调用父类的study
        super.study();
        System.out.println("I am " + super.name + ". I am the monitor");
    }

    public Monitor(String name, int sex, int age, Long studentId) {

        super(name, sex, age, studentId);
    }

    @Override
    public void study() {
        System.out.println("studying and managing...");;
    }
}

class T {
    public static void main(String[] args) {
        Monitor monitor = new Monitor("san", 1, 26, 1L);
        monitor.say();
    }
}
